package router

import (
	"gin-vue-admin/api/v1"
	"gin-vue-admin/api/view_api"
	"gin-vue-admin/middleware"
	"github.com/gin-gonic/gin"
)

func InitUserGoodsRouter(Router *gin.RouterGroup) {
	UserGoodsRouter := Router.Group("userGoods").Use(middleware.OperationRecord())
	{
		UserGoodsRouter.POST("createUserGoods", v1.CreateUserGoods)   // 新建UserGoods
		UserGoodsRouter.DELETE("deleteUserGoods", v1.DeleteUserGoods) // 删除UserGoods
		UserGoodsRouter.DELETE("deleteUserGoodsByIds", v1.DeleteUserGoodsByIds) // 批量删除UserGoods
		UserGoodsRouter.PUT("updateUserGoods", v1.UpdateUserGoods)    // 更新UserGoods
		UserGoodsRouter.GET("findUserGoods", v1.FindUserGoods)        // 根据ID获取UserGoods
		UserGoodsRouter.GET("getUserGoodsList", v1.GetUserGoodsList)  // 获取UserGoods列表
	}
}


func InitUserGoodsPublic(Router *gin.RouterGroup){
	UserGoodsRouter := Router.Group("view_api/user_goods")
	UserGoodsRouter.GET(`GetUserGoodsList`,view_api.GetUserGoodsList)
	UserGoodsRouter.POST("AddUserGoods",view_api.CreateUserGoods)
	UserGoodsRouter.POST("UpdateUserGoods",view_api.UpdateUserGoods)
	UserGoodsRouter.POST("deleteUserGoods",view_api.DeleteUserGoods)
}